﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ScheduleSystem_Tasks_ListViewer : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Task MyTask = new Task();
        String mySqlStatment = "select Name,StartDate as 'Start Date' ,DueDate as 'Due Date', Complete, Description, Priority, Status," +
            "AssignementDate as 'Assignment date' , Users.UserName as 'Employee', us.UserName as 'Customer'" +
        "from Task,Users, Users us " +
        " Where Users.UserId = Task.UserId and us.UserId = Task.CostumerId";
        ListView1.DataSource = MyTask.GetTasks(mySqlStatment);
        ListView1.DataBind();
    }
    protected void ListView1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
}